package com.atguigu.springcloud.controller;

import com.atguigu.springcloud.service.PaymentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class PaymentController {

    @Autowired
    PaymentService paymentService;

    @GetMapping("/consumer/payment/ok/{id}")
    public String get_OK(@PathVariable("id") Long id) {
        return paymentService.get_OK(id);
    }

    @GetMapping("/consumer/payment/timeout/{id}")
    public String get_TimeOut(@PathVariable("id") Long id) {
        return paymentService.get_TimeOut(id);
    }
}
